package com.demo2do.fms.admin.entity.export.supplier;

import org.apache.commons.lang3.time.DateUtils;

import com.demo2do.core.utils.DateFormatUtils;
import com.demo2do.fms.entity.authority.Organization;
import com.demo2do.fms.entity.vehicle.source.VehicleSource;
import com.demo2do.fms.entity.vehicle.tractor.Tractor;

/**
 *
 * @author Ark
 *
 */
public class VehicleSourceSheet {
    
    /** 整车id */
    private Long id;
    
    /** 运输工具代码 */
    private String code;
    
    /** 运输工具名称 */
    private String name;
    
    /** 运输工具条形码 */
    private String barCode;
    
    /** 动力类型 */
    private String powerType;
    
    /** 所属运输公司 */
    private String org;
    
    /** 结算公司 */
    private String clearingOrg;
    
    /** 开始年份 */
    private String beginYear;
    
    /** 结束年份 */
    private String endYear;
    
    private String fleet;
    
    private String driverName;
    
    private String driverMobile;
    
    /** 工具中文名称 */
    private String chineseName;
    
    /** 操作类型 */
    private String operateType;
    
    /**
     * 
     * @param vehicleSource
     * @param tractor
     * @param organization
     * @param barCode
     */
    public VehicleSourceSheet(VehicleSource vehicleSource, Tractor tractor, Organization organization, String barCode) {
        this.id = vehicleSource.getId();
        this.code = vehicleSource.getCode();
        this.name = vehicleSource.getTractorENBrandCode();
        this.chineseName = vehicleSource.getTractorBrandCode();
        this.barCode = barCode;
        this.powerType = "CL";
        this.org = organization.getCode();
        this.clearingOrg = organization.getCode();
        this.beginYear = DateFormatUtils.format(tractor.getRegistrationTime(), "yyyy");
        this.endYear = DateFormatUtils.format(DateUtils.addYears(tractor.getRegistrationTime(), 15), "yyyy");
        // TODO 车队--FMS供方须填写
//        this.driverName = driver.getName();
//        this.driverMobile = driver.getMp();
        this.operateType = "新增";
        
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the barCode
     */
    public String getBarCode() {
        return barCode;
    }

    /**
     * @return the powerType
     */
    public String getPowerType() {
        return powerType;
    }

    /**
     * @return the org
     */
    public String getOrg() {
        return org;
    }

    /**
     * @return the clearingOrg
     */
    public String getClearingOrg() {
        return clearingOrg;
    }

    /**
     * @return the beginYear
     */
    public String getBeginYear() {
        return beginYear;
    }

    /**
     * @return the endYear
     */
    public String getEndYear() {
        return endYear;
    }

    /**
     * @return the fleet
     */
    public String getFleet() {
        return fleet;
    }

    /**
     * @return the driverName
     */
    public String getDriverName() {
        return driverName;
    }

    /**
     * @return the driverMobile
     */
    public String getDriverMobile() {
        return driverMobile;
    }

    /**
     * @return the chineseName
     */
    public String getChineseName() {
        return chineseName;
    }

    /**
     * @return the operateType
     */
    public String getOperateType() {
        return operateType;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param barCode the barCode to set
     */
    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    /**
     * @param powerType the powerType to set
     */
    public void setPowerType(String powerType) {
        this.powerType = powerType;
    }

    /**
     * @param org the org to set
     */
    public void setOrg(String org) {
        this.org = org;
    }

    /**
     * @param clearingOrg the clearingOrg to set
     */
    public void setClearingOrg(String clearingOrg) {
        this.clearingOrg = clearingOrg;
    }

    /**
     * @param beginYear the beginYear to set
     */
    public void setBeginYear(String beginYear) {
        this.beginYear = beginYear;
    }

    /**
     * @param endYear the endYear to set
     */
    public void setEndYear(String endYear) {
        this.endYear = endYear;
    }

    /**
     * @param fleet the fleet to set
     */
    public void setFleet(String fleet) {
        this.fleet = fleet;
    }

    /**
     * @param driverName the driverName to set
     */
    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    /**
     * @param driverMobile the driverMobile to set
     */
    public void setDriverMobile(String driverMobile) {
        this.driverMobile = driverMobile;
    }

    /**
     * @param chineseName the chineseName to set
     */
    public void setChineseName(String chineseName) {
        this.chineseName = chineseName;
    }

    /**
     * @param operateType the operateType to set
     */
    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }
    
}
